<template>
  <div class="homeData">
    <div class="link">
      <router-link :to="{name:'Shoper'}" v-for="item in datas" :key="item._id">
        <img :src="'https://easytuan.gitee.io/node-elm-api/public/'+item.imgUrl" alt="">
        <h3>{{item.text}}</h3>
      </router-link>
    </div>

  </div>
</template>

<script>
export default {
  name:'HomeData',
  props:['sources'],
  data:function(){
    return{
      datas:this.sources
    }
  }
  
}
</script>

<style lang="less" scoped>
  .link{
    width: 95%;
    margin: 0 auto;
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  a{
    width: 18%;
    display: block;
    text-align: center;
    img{
      width: 100%;
    }
    h3{
      font-size: 25px;
      text-align: center;
      color: #666;
    }
  }
</style>